//
//  UIView+CornerRadius.m
//  BUSForPassengers
//
//  Created by jiaokeyuan on 16/8/2.
//  Copyright © 2016年 jiaokeyuan. All rights reserved.
//

#import "UIView+CornerRadius.h"

@implementation UIView (CornerRadius)
- (void)setCornerRadius:(CGFloat)cornerRadius
{
    self.layer.cornerRadius = cornerRadius;
    self.layer.masksToBounds = cornerRadius > 0;
}

- (CGFloat)cornerRadius
{
    return self.layer.cornerRadius;
}

-(void)setBorderColor:(UIColor *)borderColor
{
    self.layer.borderColor = [borderColor CGColor];
    
}

-(UIColor *)borderColor
{
    return self.borderColor;
}

-(void)setBorderWidth:(CGFloat)borderWidth
{
    self.layer.borderWidth = borderWidth;
    
}

-(CGFloat)borderWidth
{
    return self.layer.borderWidth;
    
}

-(void)setShadowOpacity:(CGFloat)shadowOpacity
{
    self.layer.shadowOpacity = shadowOpacity;
}

- (CGFloat)shadowOpacity
{
    return self.layer.shadowOpacity;
}


-(void)setShadowColor:(UIColor *)shadowColor
{
    self.layer.shadowColor = [shadowColor CGColor];
}

-(UIColor *)shadowColor
{
    return self.shadowColor;
}


@end
